<?php

class tuanModule extends Module {
	/*
	 * 在构造函数中装载所依赖的类或其他文件
	*/
	function __construct() {
		$this->includePhp('tuan', 'tuan');
	}
	
	
	/*
	 * 调用插件资源
	*/
	public function call($user, $method, $param) {
		//检查用户
		switch ($method) {
			case "getView":
				$teamId = $param->teamId;
				if (!isset($teamId)) {
					Output::instance()->resultCode(code_lackof_param);
					return;
				}
			    tuan::getView($param);
			    break;
			case "createTeamOrder":
				tuan::createTeamOrder($param);
			    break;
			case "getTeamOrderList":
				return tuan::getTeamOrderList($param);
				break;
		}
	}
}


$module = new tuanModule();
Module::addModule($module);
?>